package com.example.smartplay.mapper;

import com.example.smartplay.entity.Clubmembership;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.smartplay.entity.Result;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 
 * @since 2024-07-17
 */
@Mapper
public interface ClubmembershipMapper extends BaseMapper<Clubmembership> {
    //根据社团id和学生id查询社团成员
    @Select("select * from clubmembership where club_id = #{clubId} and student_id = #{studentId}")
    List<Clubmembership> selectByClubId(Integer clubId, Integer studentId);

    List<Clubmembership> selectClubmembershipWithName(String keyword, Integer pageNum, Integer pageSize);
    @Select("select count(*) from clubmembership")
    Integer countClubs();


}
